struct pipe {
    char * kbuf;
    int id;
    unsigned int r, w, pipsz;
    struct sleeplk full;
    struct sleeplk empty;
}; // ko->ctx

//int pipeinit ();
struct pipe * alloc_pipe ();
int free_pipe (void * ctx);
int read_pipeko (struct ko * o, void * to,unsigned int sz);
int write_pipeko (struct ko * o, void * from,unsigned int sz);